//Demo
layui.use('form', function () {
    var form = layui.form;

    //监听提交
    form.on('submit(formDemo)', function (data) {
        $.ajax({
            type: "POST",
            url: "login",
            data: data.field,
            success: function (result) {
                console.log(result);
                //layer.msg(result.msg);
            }
        });
        return false;
    });
});